#include "exynos_4412.h"

void GPIX_Init(){

	/*设置GPIX1_1为 INPUT 模式*/
	GPX1.CON = GPX1.CON & (~(0xF << 4)); 
}

int main()
{
	GPIX_Init();

	/*cpu轮训模式*/
	while(1){
		if(!(GPX1.DAT & (1 << 1))){//若 (GPX1.DAT & (1 << 1)) == 0
			printf("KEY2 Pressed\n");

			/*等待检测*/
			while(!(GPX1.DAT & (1 << 1)));
		}
		else{
		}
	}
	return 0;
}
